# -*- coding: utf-8 -*-
'''
Created on 2011-8-20

@author: zxz
'''

from sqlalchemy import Column, Integer, BigInteger, String, CHAR, DateTime
from datasource import Base
from datetime import datetime

class UserFollow(Base):
    __tablename__ = 'user_follow'
    id = Column(BigInteger, primary_key=True)
    uid = Column(BigInteger, nullable=False)
    follow = Column(BigInteger, nullable=False)
    gmt_create = Column(DateTime, nullable=False)

    def __init__(self, uid, follow, gmt_create):
        self.uid = uid
        self.follow = follow
        self.gmt_create = gmt_create

    def __repr__(self):
        return '<UserFollow %r>' % self.uid

class UserFriend(Base):
    __tablename__ = 'user_friend'
    id = Column(BigInteger, primary_key=True)
    uid = Column(BigInteger, nullable=False)
    fuid = Column(BigInteger, nullable=False)
    gmt_create = Column(DateTime, nullable=False)

    def __init__(self, uid, fuid, gmt_create):
        self.uid = uid
        self.follow = fuid
        self.gmt_create = gmt_create

    def __repr__(self):
        return '<UserFriend %r>' % self.uid
    
